Imports System
Imports System.Collections.Generic
Imports System.Text
Imports System.Data
Imports System.Collections
Imports System.Windows.Forms
Imports qLDataLayer.BaseProperty
Imports qLDataLayer.BaseProvider

Namespace BLLBase

    Public Class BLL_ThuThu
        Private oThuThuPrv As New qLProviderThuThu
        Private oTable As New DataTable
        Public Function GetAll_ThuThu(ByVal sStringConnection As String) As Object
            Try
                oTable = oThuThuPrv.GetAll_ThuThu(sStringConnection)
            Catch ex As Exception
                MessageBox.Show(ex.ToString, "Thông báo lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error)
            End Try
            Return oTable
        End Function
        Public Sub Insert_ThuThu(ByVal sStringConnection As String, ByVal oThuThu As qLPropertyThuThu)
            Try
                oThuThuPrv.Insert_ThuThu(sStringConnection, oThuThu)
            Catch ex As Exception
                MessageBox.Show(ex.ToString, "Thông báo lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error)
            End Try
        End Sub

        Public Sub Update_ThuThu(ByVal sStringConnection As String, ByVal oThuThu As qLPropertyThuThu)
            Dim bool_ As Boolean = True
            Try
                oThuThuPrv.Update_ThuThu(sStringConnection, oThuThu)
            Catch ex As Exception
                MessageBox.Show(ex.ToString, "Thông báo lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error)
            End Try
        End Sub

        Public Sub Delete_ThuThu(ByVal sStringConnection As String, ByVal MaThuThu As String)
            Try
                oThuThuPrv.Delete_ThuThu(sStringConnection, MaThuThu)
            Catch ex As Exception
                MessageBox.Show(ex.ToString, "Thông báo lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error)
            End Try
        End Sub
    End Class
    Public Class BLL_NhomThuThu
        Private oNhomThuThuPrv As New qLProviderNhomThuThu
        Private oTable As New DataTable
        Public Function GetAll_NhomThuThu(ByVal sStringConnection As String) As Object
            Try
                oTable = oNhomThuThuPrv.GetAll_NhomThuThu(sStringConnection)
            Catch ex As Exception
                MessageBox.Show(ex.ToString, "Thông báo lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error)
            End Try
            Return oTable
        End Function
        Public Sub Insert_NhomThuThu(ByVal sStringConnection As String, ByVal oNhomThuThu As qLPropertyNhomThuThu)
            Try
                oNhomThuThuPrv.Insert_NhomThuThu(sStringConnection, oNhomThuThu)
            Catch ex As Exception
                MessageBox.Show(ex.ToString, "Thông báo lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error)
            End Try
        End Sub

        Public Sub Update_NhomThuThu(ByVal sStringConnection As String, ByVal oNhomThuThu As qLPropertyNhomThuThu)
            Dim bool_ As Boolean = True
            Try
                oNhomThuThuPrv.Update_NhomThuThu(sStringConnection, oNhomThuThu)
            Catch ex As Exception
                MessageBox.Show(ex.ToString, "Thông báo lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error)
            End Try
        End Sub

        Public Sub Delete_NhomThuThu(ByVal sStringConnection As String, ByVal MaNhomThuThu As Integer)
            Try
                oNhomThuThuPrv.Delete_NhomThuThu(sStringConnection, MaNhomThuThu)
            Catch ex As Exception
                MessageBox.Show(ex.ToString, "Thông báo lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error)
            End Try
        End Sub
    End Class
    Public Class BLL_SinhVien
        Private oSinhVienPrv As New qLProviderSinhVien
        Private oTable As New DataTable
        Public Function GetAll_SinhVien(ByVal sStringConnection As String) As Object
            Try
                oTable = oSinhVienPrv.GetAll_SinhVien(sStringConnection)
            Catch ex As Exception
                MessageBox.Show(ex.ToString, "Thông báo lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error)
            End Try
            Return oTable
        End Function
        Public Sub Insert_SinhVien(ByVal sStringConnection As String, ByVal oSinhVien As qlPropertySinhVien)
            Try
                oSinhVienPrv.Insert_SinhVien(sStringConnection, oSinhVien)
            Catch ex As Exception
                MessageBox.Show(ex.ToString, "Thông báo lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error)
            End Try
        End Sub
        Public Sub Update_SinhVien(ByVal sStringConnection As String, ByVal oSinhVien As qlPropertySinhVien)
            Try
                oSinhVienPrv.Update_SinhVien(sStringConnection, oSinhVien)
            Catch ex As Exception
                MessageBox.Show(ex.ToString, "Thông báo lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error)
            End Try
        End Sub
        Public Sub Delete_SinhVien(ByVal sStringConnection As String, ByVal MaThe As String)
            Try
                oSinhVienPrv.Delete_SinhVien(sStringConnection, MaThe)
            Catch ex As Exception
                MessageBox.Show(ex.ToString, "Thông báo lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error)
            End Try
        End Sub
    End Class
    Public Class BLL_Khoa
        Private oKhoaPrv As New qlProviderKhoa
        Private oTable As New DataTable
        Public Function GetALL_Khoa(ByVal sStringConnection As String) As Object
            Try
                oTable = oKhoaPrv.GetAll_Khoa(sStringConnection)
            Catch ex As Exception
                MessageBox.Show(ex.ToString, "Thông báo lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error)
            End Try
            Return oTable
        End Function
        Public Sub Insert_Khoa(ByVal sStringConnection As String, ByVal oKhoa As qlPropertyKhoa)
            Try
                oKhoaPrv.Insert_Khoa(sStringConnection, oKhoa)
            Catch ex As Exception
                MessageBox.Show(ex.ToString, "Thông báo lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error)
            End Try
        End Sub
        Public Sub Update_Khoa(ByVal sStringConnection As String, ByVal oKhoa As qlPropertyKhoa)
            Try
                oKhoaPrv.Update_Khoa(sStringConnection, oKhoa)
            Catch ex As Exception
                MessageBox.Show(ex.ToString, "Thông báo lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error)
            End Try
        End Sub
        Public Sub Delete_Khoa(ByVal sStringConnection As String, ByVal MaKhoa As String)
            Try
                oKhoaPrv.Delete_Khoa(sStringConnection, MaKhoa)
            Catch ex As Exception
                MessageBox.Show(ex.ToString, "Thông báo lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error)
            End Try
        End Sub

    End Class
    Public Class BLL_Lop
        Private oLopPrv As New qlProviderLop
        Private oTable As New DataTable
        Public Function GetALL_Lop(ByVal sStringConnection As String) As Object
            Try
                oTable = oLopPrv.GetAll_Lop(sStringConnection)
            Catch ex As Exception
                MessageBox.Show(ex.ToString, "Thông báo lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error)
            End Try
            Return oTable
        End Function
        Public Sub Insert_Lop(ByVal sStringConnection As String, ByVal oLop As qlPropertyLop)
            Try
                oLopPrv.Insert_Lop(sStringConnection, oLop)
            Catch ex As Exception
                MessageBox.Show(ex.ToString, "Thông báo lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error)
            End Try
        End Sub
        Public Sub Update_Lop(ByVal sStringConnection As String, ByVal oLop As qlPropertyLop)
            Try
                oLopPrv.Update_Lop(sStringConnection, oLop)
            Catch ex As Exception
                MessageBox.Show(ex.ToString, "Thông báo lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error)
            End Try
        End Sub
        Public Sub Delete_Lop(ByVal sStringConnection As String, ByVal MaLop As String)
            Try
                oLopPrv.Delete_Lop(sStringConnection, MaLop)
            Catch ex As Exception
                MessageBox.Show(ex.ToString, "Thông báo lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error)
            End Try
        End Sub
    End Class
    Public Class BLL_ChuyenMucSach
        Private oTable As New DataTable
        Private oChuyenMucSachPrv As New qlProviderChuyenMucSach
        Public Function GetALL_ChuyenMucSach(ByVal sStringConnection) As Object
            Try
                oTable = oChuyenMucSachPrv.GetAll_ChuyenMucSach(sStringConnection)
            Catch ex As Exception
                MessageBox.Show(ex.ToString, "Thông báo lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error)
            End Try
            Return oTable
        End Function
        Public Sub Insert_ChuyenMucSach(ByVal sStringConnection As String, ByVal oChuyenMucSach As qlPropertyChuyenMucSach)
            Try
                oChuyenMucSachPrv.Insert_ChuyenMucSach(sStringConnection, oChuyenMucSach)
            Catch ex As Exception
                MessageBox.Show(ex.ToString, "Thông báo lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error)
            End Try
        End Sub
        Public Sub Update_ChuyenMucSach(ByVal sStringConnection As String, ByVal oChuyenMucSach As qlPropertyChuyenMucSach)
            Try
                oChuyenMucSachPrv.Update_ChuyenMucSach(sStringConnection, oChuyenMucSach)
            Catch ex As Exception
                MessageBox.Show(ex.ToString, "Thông báo lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error)
            End Try
        End Sub
        Public Sub Delete_ChuyenMucSach(ByVal sStringConnection As String, ByVal MaChuyenMucSach As String)
            Try
                oChuyenMucSachPrv.Delete_ChuyenMucSach(sStringConnection, MaChuyenMucSach)
            Catch ex As Exception
                MessageBox.Show(ex.ToString, "Thông báo lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error)
            End Try
        End Sub
    End Class
    Public Class BLL_Sach
        Private oTable As New DataTable
        Private oSachprv As New qlProviderSach
        Public Function GetALL_Sach(ByVal sStringConnection As String) As Object
            Try
                oTable = oSachprv.GetAll_Sach(sStringConnection)
            Catch ex As Exception
                MessageBox.Show(ex.ToString, "Thông báo lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error)
            End Try
            Return oTable
        End Function
        Public Sub Insert_Sach(ByVal sStringConnection As String, ByVal oSach As qlPropertySach)
            Try
                oSachprv.Insert_Sach(sStringConnection, oSach)
            Catch ex As Exception
                MessageBox.Show(ex.ToString, "Thông báo lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error)
            End Try
        End Sub
        Public Sub Update_Sach(ByVal sStringConnection As String, ByVal oSach As qlPropertySach)
            Try
                oSachprv.Update_Sach(sStringConnection, oSach)
            Catch ex As Exception
                MessageBox.Show(ex.ToString, "Thông báo lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error)
            End Try
        End Sub
        Public Sub Delete_Sach(ByVal sStringConnection As String, ByVal MaSach As String)
            Try
                oSachprv.Delete_Sach(sStringConnection, MaSach)
            Catch ex As Exception
                MessageBox.Show(ex.ToString, "Thông báo lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error)
            End Try
        End Sub
    End Class
End Namespace